/**
 * 教练中心相关API
 */
import apiClient from '../client';
import { BaseResponse } from '../../types/response';
import { CoachCenterData, CoachReservationData, CoachStatData } from '../../types/coach';

/**
 * 获取教练中心概览数据
 * @returns 教练中心概览信息
 */
export const getCoachCenterOverviewApi = async (): Promise<BaseResponse<CoachCenterData>> => {
  return apiClient.get('/api/coach-center/v1/overview');
};

/**
 * 获取教练预约数据
 * @returns 教练预约信息
 */
export const getCoachReservationsApi = async (): Promise<BaseResponse<CoachReservationData>> => {
  return apiClient.get('/api/coach-center/v1/reservations');
};

/**
 * 获取教练统计数据
 * @returns 教练统计信息
 */
export const getCoachStatsApi = async (): Promise<BaseResponse<CoachStatData>> => {
  return apiClient.get('/api/coach-center/v1/stats');
};

/**
 * 获取教练排名数据
 * @returns 教练排名信息
 */
export const getCoachRankingsApi = async (): Promise<BaseResponse<any>> => {
  return apiClient.get('/api/coach-center/v1/rankings');
};

/**
 * 确认新学员
 * @param studentId 学员ID
 * @returns 确认结果
 */
export const confirmNewStudentApi = async (studentId: number): Promise<BaseResponse<any>> => {
  return apiClient.post('/api/coach-center/v1/confirm-student', {
    student_id: studentId
  });
};